/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.admin.service;

import org.springblade.modules.admin.dto.BuildingUserDTO;
import org.springblade.modules.admin.dto.building.BuildingUserElevatorDTO;
import org.springblade.modules.admin.entity.BuildingUser;
import org.springblade.modules.admin.vo.BuildingUserVO;
import org.springblade.core.mp.base.BaseService;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springblade.modules.admin.vo.ElevatorDossierVO;
import org.springblade.modules.admin.vo.ProjectVO;
import org.springblade.modules.admin.vo.building.*;

import java.util.List;

/**
 * 项目使用单位 服务类
 *
 * @author ysq
 * @since 2023-08-09
 */
public interface IBuildingUserService extends BaseService<BuildingUser> {

	/**
	 * 使用單位分頁
	 * @param buildingUser
	 * @return
	 */
    IPage<BuildingUserVO> list(BuildingUserDTO buildingUser);

	/**
	 * 使用单位项目信息
	 * @param buildingUserDTO
	 * @return
	 */
	IPage<ProjectVO> buildDingList(BuildingUserDTO buildingUserDTO);

	/**
	 * 使用单位电梯信息
	 * @param buildingUserDTO
	 * @return
	 */
	IPage<ElevatorDossierVO> elevatorList(BuildingUserDTO buildingUserDTO);

	/**
	 * 校验是否可以删除
	 * @return
	 */
    Boolean isDelete(Long id);

    List<BuildingUser> selectList(BuildingUser buildingUser);

	/**
	 * 客户单位的使用信息
	 * @return 数据集
	 */
	BuildingUserStatusVo getBuildingUserStatus(Long id);

	/**
	 * 客户单位使用信息 分页
	 * @param buildingUserDTO 查询条件
	 * @return 数据集
	 */
	IPage<BuildingUserPageVo> pageV2(BuildingUserDTO buildingUserDTO);


	/**
	 * 获取客户单位下的电梯合同信息
	 *
	 * @param id       客户单位id
	 * @param timeType 是否隐藏 暂停维保的电梯 1:开启 0 不开启
	 * @return 数据集
	 */
	BuildingUserElevatorVo elevatorStatus(Long id, Integer timeType);


	/**
	 * 客户单位，电梯列表
	 * @param buildingUserElevatorDTO 查询条件
	 * @return 数据集
	 */
	IPage<BuildingUserElevatorDetailVo> elevatorListV2(BuildingUserElevatorDTO buildingUserElevatorDTO);

	/**
	 * 获取当前电梯所有的断档日期
	 * @param elevatorId 电梯id
	 * @return 数据集
	 */
	List<BuildingUserContractGapVo> getContractGap(Long elevatorId);
}
